package com.advaita.gui;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;

public class SetupMenuBar extends JMenuBar implements ActionListener {

	public SetupMenuBar() {
		JMenu menu1 = new JMenu("File");
		add(menu1);

		menu1.add(new JMenuItem("File"));
		menu1.add(new JMenuItem("Open zpath.."));
		menu1.add(new JMenuItem("Open demonstration >"));
		menu1.add(new JSeparator()); // SEPARATOR
		menu1.add(new JMenuItem("Excel Exporter"));
		menu1.add(new JSeparator()); // SEPARATOR
		menu1.add(new JMenuItem("Save zpath as.."));
		menu1.add(new JSeparator()); // SEPARATOR

		JMenuItem exit = new JMenuItem("Exit");
		exit.setMnemonic('x');
		exit.setActionCommand("Exit");
		exit.addActionListener(this);

		menu1.add(exit);

		// Edit pull down
		JMenu menu2 = new JMenu("Edit");
		menu2.add(new JMenuItem("Copy   Ctrl+C"));
		menu2.add(new JMenuItem("Cut   Ctrl+X"));
		menu2.add(new JMenuItem("Paste  Ctrl+V"));
		add(menu2);

		// Tools Pull Down
		JMenu menu3 = new JMenu("Tools");
		add(menu3);

		// Window Pull Down
		JMenu menu4 = new JMenu("Window");
		add(menu4);

		// Help Pull Down
		JMenu menu5 = new JMenu("Help");
		add(menu5);

	}

	@Override
	public void actionPerformed(ActionEvent e) {
		// TODO Auto-generated method stub
		if (e.getActionCommand().equals("Exit")) {
			// JOptionPane.showMessageDialog(null, "exit");
			System.exit(0);

		}
	}

}
